#pragma once
#include "stdafx.h"
#include "LogicEngine.h"
//#include "scene/Camera.h"
#include "io/InputDevice.h"
#include "game/Resource.h"
#include "Render/RenderEngine.h"
//#include "render/ScreenWorld.h"
#include "Error.h"
	
	class SLGEngine
	{
	public:
		SLGEngine();
		~SLGEngine(void);

		bool Init();
		bool InitData();	
		void NewWindow();
		static LRESULT CALLBACK MainWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
		HRESULT InitD3D();
		bool InitDevice();
		void GameLoop();
		void GameProc();
		void UpdateGame();
		void GraphRender();

	private:
		int m_screenWidth;
		int m_screenHeight;

		HWND m_hWnd;							//Window handle.
		LPDIRECT3D9 m_pD3D;
		
		D3DCAPS9 m_caps;
		D3DPRESENT_PARAMETERS m_presentParameters;
		
		DWORD m_lastTime;
		DWORD m_incTime;

		GAME_STATE	m_eGState;

		ObjectManager* m_objectManager;
		LogicEngine* m_logic;
		RenderEngine* m_render;

	};